<?php

namespace app\common\model\user;

use app\common\model\User;
use think\Model;


class UserMoneyLog extends Model
{

    

    

    // 表名
    protected $name = 'user_money_log';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'integer';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = false;
    protected $deleteTime = false;

    // 追加属性
    protected $append = [

    ];



    const cache = 60;
    public function user()
    {
        return $this->hasOne(User::class, 'id', 'user_id')->bind(['nickname' => 'nickname'])->cache(self::cache);
    }






}
